<template>
	<view>
		<view class="ding">
			<!-- 个人信息start -->
			<view class="box_fel">
				<view class="box_fel_l">
					<image :src="Data2.avatar" mode="" class="head_img"></image>
				</view>
				<view class="box_fel_c">
					<view class="fel_center_t">
						{{Data2.truename}}
					</view>
					<view class="fel_center_b">
						{{Data2.addr}}
					</view>
				</view>
				<view class="checked" v-if="Data2.status==1">
					已审核
				</view>
				<view class="nochecked" v-if="Data2.status==0">
					未审核
				</view>
			</view>
			<!-- 个人信息end -->
			<!-- 上报记录 start -->
			<view class="reported">
				<view class="reported-a" @click="gorecord">
					<view class="reported-a-a">
						{{Data1.all}}
					</view>
					<view class="reported-a-b">
						累计上报
					</view>
				</view>
				<view class="reported-b" @click="gorecord">
					<view class="reported-b-a">
						{{Data1.isFollow}}
					</view>
					<view class="reported-b-b">
						已回访
					</view>
				</view>
				<view class="reported-c" @click="gorecord">
					<view class="reported-c-a">
						{{Data1.noFollow}}
					</view>
					<view class="reported-c-b">
						未回访
					</view>
				</view>
			</view>
			<!-- 上报记录 end -->
			<!-- 个人信息联系客服start -->
			<view class="relation">
				<u-cell-group>
					<u-cell @click="gopersonal" title="个人信息" isLink>
						<view v-if="Data2.status==1" class="checked1" slot="value">
							已审核
						</view>
						<view v-if="Data2.status==0" class="checked2" slot="value">
							未审核
						</view>
					</u-cell>
					<u-cell :value="1566666666" :border="false">
						<view slot="title" class="u-slot-title">
							<text class="u-cell-text">联系客服</text>
						</view>
					</u-cell>

				</u-cell-group>
			</view>
			<!-- 个人信息联系客服end -->
		</view>
		<!-- 最近登记start -->
		<view class="recently">
			<view class="recently-a">
				<view class="recently-a-a">
				</view>
				<view class="recently-a-b">
					最近登记
				</view>
			</view>
			<u-cell-group v-for="(item,index) in Data3" :key="index">
				<u-cell@click="gomydetail(Data3[index].id)" :border="false" :title="item.village"
					:value="item.addTime"></u-cell>
			</u-cell-group>
			<u-empty v-if="Data3.length==0" mode="list" icon="/static/img/什么也没有.png">
			</u-empty>
		</view>
		<!-- 最近登记end -->
	</view>
</template>

<script>
	import {
		pageCenter
	} from "../../static/js/api/my.js"
	import {
		to
	} from "../../static/js/uilt/index.js";
	export default {
		data() {
			return {
				Data: '',
				Data1: '',
				Data2: '',
				Data3: '',
			};
		},
		onShow() {
			this.beg();
		},
		methods: {
			gomydetail(id) {
				uni.navigateTo({
					url: `/pages/mydetail/mydetail?id=${id}`
				})
			},
			gorecord() {
				uni.navigateTo({
					url: '/pages/record/record'
				})
			},
			gopersonal() {
				uni.navigateTo({
					url: `/pages/personal/personal?name=${this.Data2.nickname}&avatar=${this.Data2.avatar}`
				})
			},
			async beg() {
				this.Data = await pageCenter()
				this.Data1 = this.Data.data
				this.Data2 = this.Data.data.nongdanFillingUserPo
				this.Data3 = this.Data.data.nongdanBasicPo
			}
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";

	.checked1 {
		width: 90rpx;
		height: 35rpx;
		background: #1478FF;
		border-radius: 16rpx;
		font-size: 20rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 35rpx;
	}

	.checked2 {
		width: 90rpx;
		height: 35rpx;
		background: #C82C38;
		border-radius: 16rpx;
		font-size: 20rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 35rpx;
	}

	.checked {
		width: 90rpx;
		height: 35rpx;
		background: #1478FF;
		border-radius: 16rpx;
		font-size: 20rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 35rpx;
		position: absolute;
		left: 265rpx;
		top: 55rpx;
	}

	.nochecked {
		width: 90rpx;
		height: 35rpx;
		background: #C82C38;
		border-radius: 16rpx;
		font-size: 20rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 35rpx;
		position: absolute;
		left: 265rpx;
		top: 55rpx;
	}

	.ding {
		width: 750rpx;
		height: 600rpx;
		background: linear-gradient(180deg, #CADDF6 0%, #F1F3F4 100%);
		display: flex;
		flex-direction: column;
		justify-content: space-evenly;
		align-items: center;

		// 个人信息start
		.box_fel {
			width: 750rpx;
			height: 180rpx;
			border-radius: 20rpx;
			display: flex;
			position: relative;

			.box_fel_l {
				width: 150rpx;
				height: 180rpx;

				.head_img {
					width: 100rpx;
					height: 100rpx;
					background: #E7F1FD;
					border-radius: 50%;
					margin-top: 40rpx;
					margin-left: 21rpx;
				}
			}

			.box_fel_c {
				width: 419rpx;
				height: 180rpx;

				.fel_center_t {
					text-overflow: ellipsis;
					white-space: nowrap;
					overflow: hidden;
					width: 100rpx;
					height: 40rpx;
					font-size: 30rpx;
					font-family: PingFang SC;
					font-weight: 800;
					color: #333333;
					margin-top: 52rpx;
					margin-bottom: 29rpx;
				}

				.fel_center_b {
					height: 26rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #333333;
				}
			}
		}

		// 个人信息end
		// 上报记录start
		.reported {
			width: 710rpx;
			height: 134rpx;
			background-color: red;
			background: #FFFFFF;
			border-radius: 20rpx;
			display: flex;
			justify-content: space-around;
			align-items: center;

			.reported-a {
				display: flex;
				flex-direction: column;
				align-items: center;

				.reported-a-a {
					font-size: 42rpx;
					font-family: PingFang SC;
					font-weight: 600;
					color: #333333;
				}

				.reported-a-b {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #333333;
				}
			}

			.reported-b {
				display: flex;
				flex-direction: column;
				align-items: center;

				.reported-b-a {
					font-size: 42rpx;
					font-family: PingFang SC;
					font-weight: 800;
					color: #333333;
				}

				.reported-b-b {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #333333;
				}
			}

			.reported-c {
				display: flex;
				flex-direction: column;
				align-items: center;

				.reported-c-a {
					font-size: 42rpx;
					font-family: PingFang SC;
					font-weight: 800;
					color: #333333;
				}

				.reported-c-b {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #333333;
				}
			}
		}

		//上报记录end
		//个人信息联系客服start
		.relation {
			width: 710rpx;
			height: 180rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 20rpx;
			margin-bottom: 20rpx;

			.relation-a {
				display: flex;

				.relation-a-a {
					width: 112rpx;
					height: 26rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #999999;
				}

				.relation-a-b {
					width: 12rpx;
					height: 20rpx;
				}
			}
		}

		//个人信息联系客服end
	}

	//最近登记start
	.recently {
		width: 750rpx;
		height: 650rpx;
		background: #FFFFFF;
		border: 1px solid #EEEEEE;
		box-shadow: 3rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);

		.recently-a {
			padding: 0 20rpx;
			height: 67rpx;
			display: flex;

			.recently-a-a {
				width: 6rpx;
				height: 28rpx;
				background: #1478FF;
				margin-top: 20rpx;
			}

			.recently-a-b {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 800;
				color: #333333;
				margin-left: 8rpx;
				margin-top: 17rpx;
			}
		}
	}

	//最近登记end
</style>